{include file="Index/header" /}
 
    <form action="{:url('Link/add')}" method="post" /> 
	    <input type="hidden" name="sbt" value="1">
	    <input type="hidden" name="lid" value="{$lid}">
    	<div class="formbody">
    		<div class="formtitle"><span>友情链接{if $lid}添加 {else /}编辑 {/if}</span></div>
		    <ul class="forminfo">
			    <li>
			    	<label>跳转地址</label>
			    	<input name="url" type="text" class="dfinput" value="{$linkInfo.url}" size="80"/>
			    </li> 
			    
			    <li>
			    	<label>图片</label>
			    	<div style="float:left;margin-bottom:10px;">
			    	  <input name="path" id="img1" type="text" readonly class="dfinput" value="{$linkInfo.logo}" size="80"/>
			    	  
			    	 </div>
			    	<label class="config-upload">
								上传<input style="width:0px;" accept="image/*" name="img" id="uploadFile1" onchange="uploadImg(1);" type="file">
					</label>
					<div class="config-upload">
						<a href="javascript:void(0);" onclick="showPic(1);">预览</a>
					</div>
			    </li>
			    
			    <li>
		    	 	<label>展示状态</label>
			    	<label><input type="radio"  name="status" {if $linkInfo['status']=="1"||!$linkInfo['status']} checked{/if} value="1"><font color="grey" style="font-weight:bold;">开启</font></label>
			    	<label><input type="radio"  name="status" {if $linkInfo['status']=="2"} checked {/if}  value="2" ><font color="green" style="font-weight:bold;">禁止</font></label>
			    </li>
			    
			    <li>
			    	<label>&nbsp;</label>
			   		 <input name="sbt" type="submit" class="btn" value="确认保存"/>
			   	</li>
		    </ul>
    	</div>
	</form>
<script>
function uploadCall(obj,path){
	 $("#img"+obj).val(path);
}

//预览
function showPic(obj){
	art.dialog.open($("#showPic").val()+'?pic='+$("#img"+obj).val(),{title:'图片预览'});
}

</script>

{include file="Index/footer" /}